#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <windows.h>

BOOL launch_process(char *path)
{
    STARTUPINFO si;
    PROCESS_INFORMATION pi;
    
    ZeroMemory(&si, sizeof si);
    ZeroMemory(&pi, sizeof pi);
    si.cb = sizeof si;
    
    return CreateProcess(0,
    path, 
        NULL,           /* Process handle not inheritable */
        NULL,           /* Thread handle not inheritable */
        FALSE,          /* Set handle inheritance to FALSE */
        0,              /* No creation flags */
        NULL,           /* Use parent's environment block */
        NULL,           /* Use parent's starting directory */
        &si,            /* Pointer to STARTUPINFO structure */
        &pi);
}

int main(int argc, char *argv[])
{
        
	if (!launch_process("php-win.exe src/main.php"))
	{
		fprintf(stdout, "ERROR launching AMess.exe\n");
		return EXIT_FAILURE;
	}
    return 0;
}
//C:\WORK\filebox>gcc -mwindows -o FileBoxUploader.exe res/lock/intermediar.c res/lock/intermediar.o
